package com.lxj.stream;

import java.io.File;
import java.io.FileReader;

/**
 * TestStream2
 */
public class TestStream2 {

    public static void main(String[] args) {
        File f = new File("f:/xyz/abc/def/lol2.txt");

        try (FileReader fr = new FileReader(f)) {
            char[] all = new char[(int) f.length()];
            fr.read(all);

            for (char b : all) {
                System.out.println(b);
            }
        } catch (Exception e) {
            e.printStackTrace();
            //TODO: handle exception
        }
    }
}